/* jshint esversion: 6 */
import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Home',
    meta: { index: 1, title: '我的钱包' },
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/toEarningRecord',
    name: 'toEarningRecord',
    meta: { index: 2, title: '收益记录' },
    component: () => import(/* webpackChunkName: "about" */ '../views/toEarningRecord.vue')
  },
  {
    path: '/kstoWithdrawalHistory',
    name: 'kstoWithdrawalHistory',
    meta: { index: 3, title: '提现记录' },
    component: () => import(/* webpackChunkName: "about" */ '../views/kstoWithdrawalHistory.vue')
  }, 
  {
    path: '/kstoPayCard',
    name: 'kstoPayCard',
    meta: { index: 4, title: '我的银行卡/支付宝' },
    component: () => import(/* webpackChunkName: "about" */ '../views/kstoPayCard.vue')
  },
  {
    path: '/ksaddPay',
    name: 'ksaddPay',
    meta: { index: 5, title: '添加银行卡/支付宝' },
    component: () => import(/* webpackChunkName: "about" */ '../views/ksaddPay.vue')
  },
  {
    path: '/ksmyPayCard',
    name: 'ksmyPayCard',
    meta: { index: 6, title: '我的银行卡/支付宝' },
    component: () => import(/* webpackChunkName: "about" */ '../views/ksmyPayCard.vue')
  },
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router;
